﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using Autodesk.Revit.ApplicationServices;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using YJKSparseDistance.ControlLayer;
using RevitInteractiveUtility.ExternalEventManager;

namespace YJKSparseDistance
{
	[Transaction(TransactionMode.Manual)]
	internal class TestCmd_EvacuationDistance : IExternalCommand
	{
		public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
		{
			UIApplication application = commandData.Application;
			Application application2 = application.Application;
			UIDocument activeUIDocument = application.ActiveUIDocument;
			Document document = activeUIDocument.Document;
			IntPtr mainWindowHandle = Process.GetCurrentProcess().MainWindowHandle;
			ExternalEventManagerSingleton.GetEventManger(false);
			new EvacuationDistanceArch().DoCheck(document, new List<Level>
			{
				activeUIDocument.ActiveView.GenLevel
			});
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
